package com.tjetc.dao;

import com.tjetc.pojo.entity.Booking;
import com.tjetc.pojo.vo.BookingVO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: itda
 * @Date: 2024/5/10 21:28
 * @Description: BookingDao
 */
public interface BookingDao {
    /**
     * 新增预订信息
     * @param booking
     */
    void insert(Booking booking) throws Exception;

    /**
     * 根据id删除预订信息
     * @param id
     */
    void delete(Long id) throws Exception;

    /**
     * 根据id修改预订信息
     * @param booking
     */
    void update(Booking booking) throws Exception;

    /**
     * 查看预订信息
     * @return
     */
    List<Booking> list() throws Exception;

    /**
     * 根据时间查询预订信息
     * @param start
     * @param end
     * @return
     */
    List<BookingVO> getBookingByTime(LocalDateTime start, LocalDateTime end) throws Exception;

    /**
     * 获取预约信息
     * @param roomId
     * @param guestId
     * @return
     */
    Booking getByRGId(Long roomId, Long guestId) throws Exception;

    /**
     * 扣除十分之一的押金
     * @param id
     */
    void setTotalMoney(Long id) throws Exception;

    /**
     * 根据顾客id查预订信息
     * @param guestId
     * @return
     */
    List<Booking> getByGuestId(Long guestId) throws Exception;
}
